"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
You may need to customize this solution for your needs, but a simple way of publishing events from partial methods can be done like so: partial class LinqClass { public event Action OnValidating; partial void OnValidate(ChangeAction action) { if (OnValidating! = null) { OnValidating(this, action); } } } You may or may not need to pass along different parameters, but the Action will support numerous.
As far as I am aware, you cannot. When partial classes are encountered by the compiler, it combines them together to form a complete class. The only way I see your needs being fulfilled is to make your classes inheritable, but with L2S, this may prove to be more trouble than it's worth.
EDIT: As for events, depending on the size of your L2S class count, it all depends on what you're willing to put in. This solution could work, but will take a long time to get right. Combining Interfaces with events and custom handlers can get you there, just be prepared for the time investment if there are a large number of classes you want accessible.
MSDN - Partial Classes.
I would handle this by publishing public events at any point you desire.
If I want to compile my LINQ->SQL classes into a DLL to provide to my developers I don't think that this is a good idea. There are so many reasons why a LinqToSql Model might want to change. You will likely need to modify your model while discovering new insight into your domain etc.By creating a seperate DLL "to provide to your developers" you create an artificial boundary that is likely to hinder efficiency in development.
Getting a source control system might be more appropriate for what you may try to accomplish (beeing VERY vague here).
Yes, in most cases I'm totally in synch with you. In my scheme, though, we generate the linq->sql classes based on an internal tool that we use to model the database model quickly which lets us regenerate whenever we need to, this way the linq->sql classes and our database are always in synch. – Mustafakidd Aug 28 '09 at 16:34.
When partial classes are encountered by the compiler, it combines them together to form a complete class. The only way I see your needs being fulfilled is to make your classes inheritable, but with L2S, this may prove to be more trouble than it's worth. As for events, depending on the size of your L2S class count, it all depends on what you're willing to put in.
This solution could work, but will take a long time to get right. Combining Interfaces with events and custom handlers can get you there, just be prepared for the time investment if there are a large number of classes you want accessible.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.